using SqlSugar;
using System.ComponentModel;

namespace CoreShop.Model
{
    /// <summary>
    /// 特价折扣设置表
    /// </summary>
    public class corecmsdiscountrules
    {
        [SugarColumn(ColumnDescription = "序列", IsPrimaryKey = true)]
        public System.Int64 id  { get; set; }

        /// <summary>
        /// 总店id
        /// </summary>
        [SugarColumn(ColumnDescription = "总店id")]
        public System.Int32 corpId  { get; set; }

        /// <summary>
        /// 门店id
        /// </summary>
        [SugarColumn(ColumnDescription = "门店id")]
        public System.Int32 storeId  { get; set; }

        /// <summary>
        /// 促销状态(0未审核，1已审核，2停用)
        /// </summary>  
        [SugarColumn(ColumnDescription = "促销状态(0未审核，1已审核，2停用)")]
        public System.Int32 status  { get; set; }

        /// <summary>
        /// 方案编码
        /// </summary>
        [SugarColumn(ColumnDescription = "方案编码", Length = 100)]
        public System.String programmeCode  { get; set; }

        /// <summary>
        /// 方案名称
        /// </summary>  
        [SugarColumn(ColumnDescription = "方案名称", Length = 100)]
        public System.String programmeName  { get; set; }

        /// <summary>
        /// 促销人群（0全部 1非会员 2会员）
        /// </summary>   
        [SugarColumn(ColumnDescription = "促销人群（0全部 1非会员 2会员）")]
        public System.Int32 discountUserType  { get; set; }

        /// <summary>
        /// 促销开始时间
        /// </summary>
        [SugarColumn(ColumnDescription = "促销开始时间", IsNullable = true)]
        public System.DateTime? startTime { get; set; }


        /// <summary>
        /// 促销结束时间
        /// </summary>
        [SugarColumn(ColumnDescription = "促销结束时间", IsNullable = true)]
        public System.DateTime? endTime { get; set; }


        /// <summary>
        /// 一个星期哪几天有优惠(比如,1,2,6代表星期一，二,六）
        /// </summary>
        [SugarColumn(Length = 100, ColumnDescription = "一个星期哪几天有优惠(比如,1,2,6代表星期一，二,六）")]
        public System.String weekValues { get; set; }


        /// <summary>
        /// 指定方式（0.全部,1.商品，2.类别）
        /// </summary>
        [SugarColumn(ColumnDescription = "指定方式（0.全部,1.商品，2.类别）")]
        public System.Int32 appointType { get; set; }


        /// <summary>
        /// 促销模式（1特价，2折扣，3买一送一，4第二份半价)
        /// </summary>
        [SugarColumn(ColumnDescription = "促销模式（1特价，2折扣，3买一送一，4第二份半价)")]
        public System.Int32 discountType { get; set; }

        /// <summary>
        /// 修改时间截
        /// </summary>
        [SugarColumn(ColumnDescription = "修改时间截", IsNullable = true)]
        public System.Int64? modifyTime { get; set; }

        /// <summary>
        /// 是否促销所有门店(1.是，0否)
        /// </summary>
        [SugarColumn(ColumnDescription = "是否促销所有门店")]
        public System.Byte isAllUseStore { get; set; }

        /// <summary>
        /// 关联corecmsdiscountrules表的id
        /// </summary>
        [SugarColumn(ColumnDescription = "关联corecmsdiscountrules表的id")]
        public System.Int64 discountRulesId { get; set; }


        /// <summary>
        /// 商品规格Id或分类Id,根据主表字段appointType
        /// </summary>
        [SugarColumn(ColumnDescription = "商品规格Id或分类Id,根据主表字段appointType")]
        public System.Int64 foodOrCategoryId { get; set; }

        /// <summary>
        /// 特价价格
        /// </summary>
        [SugarColumn(ColumnDescription = "特价价格", Length = 10, DecimalDigits = 2)]
        public System.Decimal discountPrice { get; set; } = 0.00M;

        /// <summary>
        /// 折扣值(1-99)
        /// </summary>
        [SugarColumn(ColumnDescription = "折扣值(1-99)", Length = 10, DecimalDigits = 2)]
        public System.Decimal discountValue { get; set; } = 99;

        /// <summary>
        /// 零售原单价
        /// </summary>
        [SugarColumn(ColumnDescription = "零售原单价", Length = 10, DecimalDigits = 2, IsNullable = true)]
        public System.Decimal? posPrice { get; set; } = 0.00M;

    }
}
